//
//  HCViewController.m
//  HCVideoModule
//
//  Created by jiangqianqiu on 09/23/2021.
//  Copyright (c) 2021 jiangqianqiu. All rights reserved.
//

#import "HCViewController.h"
#import <DJDCallVideoVC.h>
#import <ReactiveObjC.h>

@interface HCViewController ()
@property(nonatomic,strong)DJDCallVideoVC *djVideoVC;
@property(nonatomic,strong)UIButton *videoBtn;

@end

@implementation HCViewController

- (void)viewDidLoad
{
    [super viewDidLoad];
	// Do any additional setup after loading the view, typically from a nib.
    [self.view addSubview:self.videoBtn];
    self.djVideoVC = [[DJDCallVideoVC alloc] init];
    [[self.videoBtn rac_signalForControlEvents:UIControlEventTouchUpInside] subscribeNext:^(__kindof UIControl * _Nullable x) {
        
        NSLog(@"点击按钮事件响应了");
        [self.djVideoVC show];
       
        }];
   
}
-(UIButton *)videoBtn{
    if (!_videoBtn) {
        _videoBtn = [UIButton buttonWithType:UIButtonTypeCustom];
        _videoBtn.frame = CGRectMake(100, 200,100,80);
        [_videoBtn setTitle:@"开始视频" forState:UIControlStateNormal];
        [_videoBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
        _videoBtn.backgroundColor = [UIColor blueColor];
       
    }
    return _videoBtn;
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
